package com.ynny.demo08;

import java.time.LocalDateTime;
import java.util.Scanner;

public class Xun {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            while (true) {
                System.out.print("输入字符继续循环，按入n退出循环：");
                String a = scanner.nextLine();
                if (a.equals("n")) {
                    break;
                } else {

                    LocalDateTime now = LocalDateTime.now();

                    System.out.println( "：循环操作中~~~ 按n退出循环");
                }
            }
            scanner.close();
            System.out.println("退出循环");
        }
    }

